home *** CD-ROM | disk | FTP | other *** search
- Path: howland.reston.ans.net!agate!parsons
- From: parsons@vouvray.CS.Berkeley.EDU (David C. Parsons)
- Newsgroups: comp.lang.c++
- Subject: Newbie question on syntax of pointer to const
- Date: 29 Jan 1996 20:07:44 GMT
- Organization: University of California, Berkeley
- Message-ID: <4ej9eg$lq6@agate.berkeley.edu>
- NNTP-Posting-Host: vouvray.cs.berkeley.edu
-
- In a declaration of a const reference or const pointer type, does it matter
- in what the order the keyword const and the underlying type appear? That
- is, are
-
- (1) const double *pc; and
- (2) double const *pc;
-
- both acceptable syntax for type "pointer to constant double"? (My book only
- describes (1), but my compiler accepts either.)
-
- The reason I ask is because I'm getting the following error from the linker:
-
- /bin/ld: Unsatisfied symbols:
- operator<<(ostream &, Matrix<double> const &)(code)
- Matrix<double>::Matrix(Matrix<double> const &)(code)
-
- even though I have definitions like these:
-
- template <class Type>
- ostream& operator <<( ostream& os, const Matrix<Type>& m )
- { ... }
-
- template <class Type>
- Matrix<Type>::Matrix( const Matrix<Type> &m )
- { ... }
-
- Are the function prototypes in the error message different from these in
- some way I'm overlooking?
-
- Many thanks in advance.
-
- David Parsons
-